package com.peycard.common;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Arrays;

public class FinancialTransactionsDTO implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private long idFinancialTransactions;
	private String dateTimeServer;
	private String dateTimeTx;
	private String refNum;
	private String status;
	private String respCode;
	private String noAut;
	private BigDecimal amount;
	private String pan;
	private Double latitude;
	private Double longitude;
	private boolean email;
	private byte[] sign;

	public long getIdFinancialTransactions() {
		return idFinancialTransactions;
	}

	public void setIdFinancialTransactions(long idFinancialTransactions) {
		this.idFinancialTransactions = idFinancialTransactions;
	}

	public String getDateTimeServer() {
		return dateTimeServer;
	}

	public void setDateTimeServer(String dateTimeServer) {
		this.dateTimeServer = dateTimeServer;
	}

	public String getDateTimeTx() {
		return dateTimeTx;
	}

	public void setDateTimeTx(String dateTimeTx) {
		this.dateTimeTx = dateTimeTx;
	}

	public String getRefNum() {
		return refNum;
	}

	public void setRefNum(String refNum) {
		this.refNum = refNum;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getRespCode() {
		return respCode;
	}

	public void setRespCode(String respCode) {
		this.respCode = respCode;
	}

	public String getNoAut() {
		return noAut;
	}

	public void setNoAut(String noAut) {
		this.noAut = noAut;
	}

	public BigDecimal getAmount() {
		return amount;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	public String getPan() {
		return pan;
	}

	public void setPan(String pan) {
		this.pan = pan;
	}

	public Double getLatitude() {
		return latitude;
	}

	public void setLatitude(Double latitude) {
		this.latitude = latitude;
	}

	public Double getLongitude() {
		return longitude;
	}

	public void setLongitude(Double longitude) {
		this.longitude = longitude;
	}

	public boolean isEmail() {
		return email;
	}

	public void setEmail(boolean email) {
		this.email = email;
	}

	public byte[] getSign() {
		return sign;
	}

	public void setSign(byte[] sign) {
		this.sign = sign;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((amount == null) ? 0 : amount.hashCode());
		result = prime * result
				+ ((dateTimeServer == null) ? 0 : dateTimeServer.hashCode());
		result = prime * result
				+ ((dateTimeTx == null) ? 0 : dateTimeTx.hashCode());
		result = prime * result + (email ? 1231 : 1237);
		result = prime
				* result
				+ (int) (idFinancialTransactions ^ (idFinancialTransactions >>> 32));
		result = prime * result
				+ ((latitude == null) ? 0 : latitude.hashCode());
		result = prime * result
				+ ((longitude == null) ? 0 : longitude.hashCode());
		result = prime * result + ((noAut == null) ? 0 : noAut.hashCode());
		result = prime * result + ((pan == null) ? 0 : pan.hashCode());
		result = prime * result + ((refNum == null) ? 0 : refNum.hashCode());
		result = prime * result
				+ ((respCode == null) ? 0 : respCode.hashCode());
		result = prime * result + Arrays.hashCode(sign);
		result = prime * result + ((status == null) ? 0 : status.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		FinancialTransactionsDTO other = (FinancialTransactionsDTO) obj;
		if (amount == null) {
			if (other.amount != null)
				return false;
		} else if (!amount.equals(other.amount))
			return false;
		if (dateTimeServer == null) {
			if (other.dateTimeServer != null)
				return false;
		} else if (!dateTimeServer.equals(other.dateTimeServer))
			return false;
		if (dateTimeTx == null) {
			if (other.dateTimeTx != null)
				return false;
		} else if (!dateTimeTx.equals(other.dateTimeTx))
			return false;
		if (email != other.email)
			return false;
		if (idFinancialTransactions != other.idFinancialTransactions)
			return false;
		if (latitude == null) {
			if (other.latitude != null)
				return false;
		} else if (!latitude.equals(other.latitude))
			return false;
		if (longitude == null) {
			if (other.longitude != null)
				return false;
		} else if (!longitude.equals(other.longitude))
			return false;
		if (noAut == null) {
			if (other.noAut != null)
				return false;
		} else if (!noAut.equals(other.noAut))
			return false;
		if (pan == null) {
			if (other.pan != null)
				return false;
		} else if (!pan.equals(other.pan))
			return false;
		if (refNum == null) {
			if (other.refNum != null)
				return false;
		} else if (!refNum.equals(other.refNum))
			return false;
		if (respCode == null) {
			if (other.respCode != null)
				return false;
		} else if (!respCode.equals(other.respCode))
			return false;
		if (!Arrays.equals(sign, other.sign))
			return false;
		if (status == null) {
			if (other.status != null)
				return false;
		} else if (!status.equals(other.status))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "FinancialTransactionsDTO [idFinancialTransactions="
				+ idFinancialTransactions + ", dateTimeServer="
				+ dateTimeServer + ", dateTimeTx=" + dateTimeTx + ", refNum="
				+ refNum + ", status=" + status + ", respCode=" + respCode
				+ ", noAut=" + noAut + ", amount=" + amount + ", pan=" + pan
				+ ", latitude=" + latitude + ", longitude=" + longitude
				+ ", email=" + email + ", sign=" + Arrays.toString(sign) + "]";
	}

}
